﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VH.SharePoint.Api.MetaWeblog;
using VH.SharePoint.Api.Queries;

namespace VH.SharePoint.Api
{
    public abstract class MediaRepository : IRepository<MediaObjectInfo, String>
    {
        public abstract IEnumerable<MediaObjectInfo> FindAll();
        public abstract IEnumerable<MediaObjectInfo> FindAll(QueryConstraints<MediaObjectInfo> constraints);
        public abstract MediaObjectInfo Get(string id);

        public virtual void Create(MediaObjectInfo entity)
        {
            throw new NotSupportedException();
        }
        public abstract void Create(MediaObjectInfo entity, Byte[] mediaContent);

        public abstract void Update(MediaObjectInfo entity);
        public abstract void Update(MediaObjectInfo entity, Byte[] mediaContent);

        public abstract void Delete(MediaObjectInfo entity);
        public abstract void ValidateUser(string username, string password);
    }
}
